import axios from 'axios';

const http = axios.create({
    baseURL: import.meta.env.VITE_APP_BASE_API,
    timeout: 10000,
    headers: {
        'Content-Type': 'application/json'
    }
});

http.interceptors.request.use(config => {
    // Add any request interceptors here
    return config;
}, error => {
    return Promise.reject(error);
});

http.interceptors.response.use(response => {
    // Handle response data
    return response.data;
}, error => {
    return Promise.reject(error);
});

export default http;